<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="ko">
<head>
	<title>권한관리</title>
	<link rel="stylesheet" href="../css/jquery.treeview.css" />	
	<script src="../js/common.js" type="text/javascript"></script>
	<script type="text/javascript">
		function setPage(page)
		{
			var frm = document.forms["listMap"];
			frm.action = "/admin/authmng_list.do";
			frm.page.value = page;
			frm.submit();
		}
		
		function readAuth(userId)
		{
			if(checkAuth()) popup('/admin/authmng_popup.do?userId='+userId ,'',500,300);
		}
	</script>
</head>
<body>
	<form id="listMap" name="listMap" method="get">
		<input type="hidden" name="page" value="1" />
		<input type="hidden" name="conditions" value="${commandMap.conditions}" />
		<input type="hidden" name="words" value="${commandMap.words}" />
	</form>
	<!-- 본문 영역 -->
	<div id="contents">
		<!-- 제목 및 Location 영역 -->
		<div id="location">
			<h3>권한관리</h3>
			<div>홈 &gt; 관리메뉴 &gt; <strong>권한관리</strong></div>
		</div>
		
		<!-- 본문 내용 -->
			<div id="content">
				<div class="boxType01">
					<form name="searchFrm" emthod="get">
					<div class="cont ar">
						<select title="검색 조건 선택" name="conditions">
							<option value="admin_id">아이디</option>
							<option value="admin_name">이름</option>
						</select>
						<input type="text" name="words" size="25" />
						<span class="button btnProc04"><input type="submit" value="검색"/></span>
					</div>
					</form>
				</div>
				<table cellpadding="0" cellspacing="0" border="0" class="tbl_type01 mt20">
					<colgroup>
						<col width="50px" />
						<col width="70px"/>
						<col width="70px" />
						<col width="70px" />
						<col width="70px" />
						<col width="50px" />
					</colgroup>
					<thead>
						<tr>
							<th>No</th>
							<th>ID</th>
							<th>이름</th>
							<th>소속</th>
							<th>직위</th>
							<th>구분</th>
						</tr>
					</thead>
					<tbody>
						<c:forEach items="${listMap}" var="listMap" varStatus="status">
							<tr>
								<td>${status.count}</td>
								<td>
									<a href="#" onclick="readAuth('${listMap.ADMIN_ID}')">
										${listMap.ADMIN_ID}
									</a>
								</td>
								<td>
									<a href="#" onclick="readAuth('${listMap.ADMIN_ID}')">
										${listMap.ADMIN_NAME}
									</a>
								</td>
								<td>
									<a href="#" onclick="readAuth('${listMap.ADMIN_ID}')">
										${listMap.ADMIN_PART}
									</a>
								</td>
								<td>
									<a href="#" onclick="readAuth('${listMap.ADMIN_ID}')">
										${listMap.ADMIN_TITLE}
									</a>
								</td>
					           	<td>${listMap.ADMIN_GUBUN}</td>
							</tr>
						</c:forEach>
					</tbody>
				</table>
				<%@include file="/include/pageList.jsp"%>
			</div>
		</div>
	</div>
</body>
</html>